<!-- Main content -->
@extends('layouts.default')
@section('css')
    <link rel="stylesheet" href="{{asset('admin-lte/plugins/datatables/dataTables.bootstrap4.css')}}">
    {{--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">--}}
    <style>
        .help-block-error{
            color:red;
        }
    </style>
@stop

@section('content')
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-header">
                    <h3 class="card-title">提现管理 / <a class="text-primary" href="{{url('admin/cash/set_index')}}">提现配置</a></h3>
                </div>

                <div class="card-body">
                    @include('layouts.message')
                    <form role="form" method="post" action="{{url('admin/cash/save_set')}}" id="validation-form">
                        <div class="card-body">
                            {{csrf_field()}}
                            {{--<div class="form-group">--}}
                                {{--<label for="cash_service_charge">提现手续费比例</label>--}}
                                {{--<input name="Cash[cash_service_charge]" type="number" class="form-control" id="cash_service_charge" placeholder="单位百分比" value="{{isset($config_arr)?$config_arr['cash_service_charge']:''}}">--}}
                            {{--</div>--}}
                            <div class="form-group">
                                <label for="cash_min_money">提现最低金额</label>
                                <input name="Cash[cash_min_money]" type="number" class="form-control" id="cash_min_money" placeholder="提现最低金额" value="{{isset($config_arr)?$config_arr['cash_min_money']:''}}">
                            </div>
                        </div>
                        <!-- /.card-body -->

                        <div class="card-footer">
                            <button type="submit" class="btn btn-primary">保存</button>
                            <button type="reset" class="btn btn-info">重置</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

@stop



@section('script')
    {{--layer插件--}}
    <script src='{{asset("admin-lte/plugins/layer-v3.1.1/layer.js")}}' type="text/javascript"></script>
    {{--jqueryVlaition插件--}}
    <script src="{{asset('admin-lte/plugins/jquery-validation/js/jquery.validate.js')}}"></script>
    <script src="{{asset('js/spu/form-validate.js')}}"></script>
    <script>
        //表单验证
        validate(
            {
                'Cash[cash_min_money]':{'required': true},
                'Cash[cash_service_charge]':{'required': true,min:0,max:100},
//                'Recharge[recharge_limit]':{'required': true},
//                'Recharge[gift_limit]':{'required': true}
            },
            {
                'Cash[cash_min_money]':{'required': '提现最低金额不能为空'},
                'Cash[cash_service_charge]':{'required': '提现手续费不能为空',min:'必须是0-100之间的数字',max:'必须是0-100之间的数字'},
//                'Recharge[recharge_limit]':{'required': '充值优惠次数不能'},
//                'Recharge[gift_limit]':{'required': '优惠类型不能为空'}
            }
        );
    </script>
@stop
